<template>
	<view class="serviceTwo">
		<view class="serviceTwo-plate-1">
			<view class="title">
				<view class="bian">
					
				</view>
				<text>{{name}}</text>
			</view>
			<view class="item" v-for="(item,index) in listArr" :kety="index" @click="goDetail(item.self_service_id)">
				<text>{{item.service_title}}</text>
				<u-icon name="arrow-right" color="#666" size="20"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				name:'',
				listArr:[]
			};
		},
		onLoad(options) {
			this.id = options.id
			this.name = options.name
			this.getPageData()
		},
		created() {
		},
		methods:{
			// 前往列表详情
			goDetail(id){
				uni.navigateTo({
					url:'listDetail/listDetail?id=' + id
				})
			},
			// 请求页面数据
			getPageData(){
				uni.request({
				    url:this.$Url +'/index.php/App/Service/selfServiceList',
				    method:'POST',
				    data:{
				       base_pics_id:this.id,
					   p:1
				    },
				    header:{
				        "token":uni.getStorageSync('token')
				    },
				    success: (res) => {
				       if (res.data.status == 200) {
							this.listArr = res.data.data.self_service_list
				       } else{
							uni.showToast({
								title:res.data.msg,
								icon:'none',
								duration:1200
							})
				       }
				    }
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.serviceTwo{
	width: 100vw;
	min-height: 100vh;
	background-color: #fff;
	.serviceTwo-plate-1{
		background-color: #fff;
		margin-top: 20upx;
		.title{
			width: 100%;
			margin-left: 30upx;
			height: 80upx;
			display: flex;
			align-items: center;
			border-bottom: 1upx solid #e7e7e7;
			.bian{
				width: 6upx;
				height: 44upx;
				margin-right: 15upx;
				background-color: $zhuti-color;
			}
			text{
				font-size: 27upx;
				color: #333;
			}
		}
		.item{
			width: 100%;
			border-bottom: 1upx solid #e7e7e7;
			height: 78upx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30upx;
			text{
				font-size: 26upx;
				color: #666;
			}
		}
	}
}
</style>
